package java8;

/**
 * Title.<br>
 * Description.
 * <p>
 * Copyright: Copyright (c) 2017年5月27日 下午4:51:06
 * <p>
 * Company: 翡翠教育
 * <p>
 * 
 * @author zhaomingxing
 * @version 1.0
 */
public class Java8TesterDefault {

	public static void main(String args[]) {
		Vehicle vehicle = new Cars();
		vehicle.print();
	}
}

interface Vehicle {

	default void print() {
		System.out.println("我是一辆车!");
	}

	static void blowHorn() {
		System.out.println("按喇叭!!!");
	}
}

interface FourWheeler {

	default void print() {
		System.out.println("我是一辆四轮车!");
	}
}

class Cars implements Vehicle, FourWheeler {

	@Override
	public void print() {
		Vehicle.super.print();
		FourWheeler.super.print();
		Vehicle.blowHorn();
		System.out.println("我是一辆汽车!");
	}
}
